package library.dao;

import java.util.List;

import library.dao.Impl.BorrowHistoryDao;
import library.pojo.Book;
import library.pojo.BookType;
import library.pojo.BorrowHistory;
import library.pojo.User;
import library.pojo.UserType;

public interface IlibraryDao {
	public void save(Book book);
	public void update(Book book);
	public List<Book> get(String isbn);
	public void delete(String isbn);
	public List<Book> findAll();
	
	public void addBookType(BookType bookType);
	public void deleteBookType(String idx);
	public void updateBookType(BookType bookType);
	public BookType getBookType(String idx);
	public List<BookType> findAllBookType();
	public String getTypeName(String idx);
	
	public void addUser(User user);
	public void deleteUser(String username);
	public void updateUser(User user);
	public User getUser(String username);
	public List<User> findAllUser();
	
	public void addUserType(UserType userType);
	public void deleteUserType(String id);
	public void updateUserType(UserType userType);
	public UserType getUserType(String id);
	public List<UserType> findAllUserType();
	
	public void addBorrowHistory(BorrowHistory borrowHistory);
	public void deleteBorrowHistory(String isbn , String borrowUser);
	public void updateBorrowHistory(BorrowHistory borrowHistory);
	public BorrowHistory getBorrowHistory(String userId);
	public List<BorrowHistory> findAllBorrowHistory();
}
